const userDao = require('./../dao/userDao.js');

var getUserById = async (userId) => {
	try {
		var users = userDao.getUserById(userId);
	} catch(e) {
		console.log(e);
	}
	
	var responseContent = '';
	console.log(users);
  	if (users) {
		for(let user of users) {
		    reaponseContent += '姓名：' + user.name + ' |';
		    reaponseContent += '年龄：' + user.age + ' |';
		    reaponseContent += '身高：' + user.height + '<br />';
		}
	}
  return responseContent;
}

module.exports = {
  getUserById : getUserById
};

